﻿@model CREAPA.Dominio.Contracheque

@{
    ViewBag.Title = "Visualizar";
    Layout = "~/Views/Shared/_LayoutSemTopo.cshtml";
}

<style>
    * {
        margin: 0;
        padding: 0;
    }

    fieldset.grupo {
        border: 0;
    }

    fieldset.borda {
        border: 1px solid #000;
        width: 646PX;
    }


    body, input, select, textarea, button {
        font-family: sans-serif;
        font-size: 1em;
    }

    .grupo:after {
        content: ".";
        display: block;
        height: 0;
        clear: both;
        visibility: hidden;
    }

    .campo {
        /*margin-bottom: 1em;*/
        /*border: 1px solid #000;*/
        width: 127px;
        height: 15px;
        font-size: 10px;
    }

    .campo2 {
        /*margin-bottom: 1em;*/
        border: 1px solid #000;
        width: 200px;
        height: 62px;
        font-size: 10px;
    }

    .campo3 {
        /*margin-bottom: 1em;*/
        border: 1px solid #000;
        width: 497px;
        height: 25px;
        font-size: 16px;
    }

    .campo4 {
        /*margin-bottom: 1em;*/
        border: 1px solid #000;
        width: 500px;
        height: 30px;
        font-size: 10px;
    }

    .campo6 {
        /*margin-bottom: 1em;*/
        border: 1px solid #000;
        width: 702px;
        height: 30px;
        font-size: 10px;
    }

    .campo7 {
        /*margin-bottom: 1em;*/
        border: 1px solid #000;
        width: 497px;
        height: 50px;
        font-size: 10px;
    }

    .campo8 {
        /*margin-bottom: 1em;*/
        border: 1px solid #000;
        width: 145px;
        height: 77px;
        font-size: 10px;
    }

    .campo9 {
        /*margin-bottom: 1em;*/
        /*border: 1px solid #000;*/
        width: 260px;
        height: 15px;
        font-size: 10px;
    }

    .campo10 {
        margin-left: 8px;
        /*border: 1px solid #000;*/
        width: 123px;
        height: 15px;
        font-size: 10px;
    }

    .campo11 {
        /*margin-bottom: 1em;*/
        border: 1px solid #000;
        border-right: none;
        width: 128.2px;
        height: 20px;
        font-size: 10px;
    }

    .campo12 {
        /*margin-bottom: 1em;*/
        border: 1px solid #000;
        border-top: none;
        border-left: none;
        width: 132.5px;
        height: 13px;
        font-size: 10px;
    }

    .campo13 {
        /*margin-bottom: 1em;*/
        border-right: 1px solid #000;
        width: 378px;
        height: 30px;
        font-size: 10px;
    }

    .campo label {
        margin-bottom: 0.2em;
        color: #000;
        display: block;
        margin-left: 3px;
    }

    fieldset.grupo .campo {
        float: left;
        /*margin-right: 3em;
            margin-left: 3px;*/
    }

    fieldset.grupo .campo2 {
        float: left;
        /*margin-right: 3em;
            margin-left: 3px;*/
    }

    fieldset.grupo .campo3 {
        float: left;
        /*margin-right: 3em;
            margin-left: 3px;*/
    }

    fieldset.grupo .campo4 {
        float: none;
        /*margin-right: 3em;
            margin-left: 3px;*/
    }

    fieldset.grupo .campo7 {
        float: left;
        /*margin-right: 3em;
            margin-left: 3px;*/
    }

    fieldset.grupo .campo8 {
        float: left;
        /*margin-right: 3em;
            margin-left: 3px;*/
    }

    fieldset.grupo .campo9 {
        float: left;
        /*margin-right: 3em;
            margin-left: 3px;*/
    }

    fieldset.grupo .campo10 {
        float: left;
        /*margin-right: 3em;
            margin-left: 3px;*/
    }

    fieldset.grupo .campo11 {
        float: left;
        /*margin-right: 3em;
            margin-left: 3px;*/
    }

    fieldset.grupo .campo12 {
        float: left;
        /*margin-right: 3em;
            margin-left: 3px;*/
    }

    fieldset.grupo .campo13 {
        float: left;
        /*margin-right: 3em;
            margin-left: 3px;*/
    }


    .campo input[type="text"],
    .campo input[type="email"],
    .campo input[type="url"],
    .campo input[type="tel"] {
        padding: 0.2em;
        border: 1px solid #CCC;
        box-shadow: 2px 2px 2px rgba(0,0,0,0.2);
        display: block;
        width: 200%;
        margin-left: 3px;
    }

    .campo textarea {
        padding: 0.2em;
        border: 1px solid #CCC;
        box-shadow: 2px 2px 2px rgba(0,0,0,0.2);
        display: block;
        width: 525px;
        margin-left: 3px;
    }

    .campo select option {
        padding-right: 1em;
    }

    .campo input:focus, .campo select:focus, .campo textarea:focus {
        background: #ffffff;
    }

    .campo label.checkbox {
        color: #000;
        display: inline-block;
        margin-right: 1em;
    }

    .noprint {
        border-top: 1px #96d1f8;
        background: #65a9d7;
        background: -webkit-gradient(left top, left bottom, from(#3e779d), to(#65a9d7));
        background: -webkit-linear-gradient(top, #3e779d, #65a9d7);
        background: -moz-linear-gradient(top, #3e779d, #65a9d7);
        background: -ms-linear-gradient(top, #3e779d, #65a9d7);
        background: -o-linear-gradient(top, #3e779d, #65a9d7);
        padding: 5.5px 12px;
        -webkit-border-radius: 8px;
        -moz-border-radius: 4px;
        border-radius: 4px;
        -webkit-box-shadow: rgba(0,0,0,0) 0 1px 0;
        -moz-box-shadow: rgba(0,0,0,0) 0 1px 0;
        box-shadow: rgba(0,0,0,0) 0 1px 0;
        text-shadow: rgba(0,0,0,0) 0 1px 0;
        color: white;
        font-size: 12px;
        text-decoration: none;
        vertical-align: middle;
    }

        .noprint:hover {
            border-top: 1px #96d1f8;
            background: #28597a;
        }

        .noprint:active {
            border-top: 1px #96d1f8;
            background: #28597a;
        }
</style>

<h2>Contracheque (@ViewBag.Titulo)</h2>

@using (Html.BeginForm("Consultar", "Contracheque", FormMethod.Post,
          new { enctype = "multipart/form-data" }))
{
 @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
<fieldset class="borda">
    <fieldset class="grupo">
        <div class="campo8">
            <img src="~/Content/images/logo-crea.jpg" style="width: 144px; height: 45px; margin-left: 0px; margin-top: 8px;">
        </div>

        <div class="campo3">
            <b>Recibo de Pagamento</b>
        </div>
        <div class="campo7">
            Conselho Regional de Engenharia e Agronomia CREA-PA<br />
            Travessa Dr. Moraes, 194
            <br />
            CNPJ: 05065511/000105   
        </div>

    </fieldset>


    <fieldset class="grupo">
        <div class="campo">
            Matrícula: @Html.DisplayFor(model => model.Pessoa.Funcionarios.Matricula)
        </div>

        <div class="campo9">
            Nome: @Html.DisplayFor(model => model.Pessoa.Nome)
        </div>

        <div class="campo">
            CBO: @Html.DisplayFor(model => model.Pessoa.Funcionarios.Cbo)  
        </div>

        <div class="campo">
            CH_SEM:  @Html.DisplayFor(model => model.Pessoa.Funcionarios.CargaHo)
        </div>
    </fieldset>

    <fieldset class="grupo">
        <div class="campo">
            CTPS: @Html.DisplayFor(model => model.Pessoa.Funcionarios.ctps_serie)
        </div>

        <div class="campo">
            CPF: @Html.DisplayFor(model => model.Pessoa.CPF)
        </div>

        <div class="campo">
            RG: @Html.DisplayFor(model => model.Pessoa.Funcionarios.Rg)
        </div>

        <div class="campo">
            PIS/PASEP:  @Html.DisplayFor(model => model.Pessoa.Funcionarios.Pis)
        </div>
        <div class="campo10">
            Adm: @Html.DisplayFor(model => model.Pessoa.Funcionarios.DtAdm)
        </div>
    </fieldset>

    <fieldset class="grupo">
        <div class="campo9">
            Função: @Html.DisplayFor(model => model.Pessoa.Funcionarios.IdCargo)
        </div>

        <div class="campo9" style="width: 320px;">
            Lotação: @Html.DisplayFor(model => model.Pessoa.Funcionarios.Setor)
        </div>
    </fieldset>
</fieldset>
if (ViewBag.ListaCCI != null)
    {        
        var grid = new WebGrid(ViewBag.ListaCCI, rowsPerPage: 50);         
        <div>
            @grid.GetHtml(tableStyle: "tableCC",
    columns:
        grid.Columns(
            grid.Column("Código", format: @<text><center>@item.Codigo</center></text>),           
            grid.Column("Descrição", format: @<text>@item.Descricao</text>),
            grid.Column("Proventos", format: @<text><center>@String.Format("{0:n2}",@item.Proventos)</center></text>),
            grid.Column("Descontos", format: @<text><center>@String.Format("{0:n2}",@item.Descontos)</center></text>)
))
        </div>
}  

<fieldset class="borda">
    <fieldset class="grupo">

        <div class="campo13">
            OBS: @Html.DisplayFor(model => model.Descricao)
        </div>
        <div class="campo12">
            Tot.Venc: @String.Format("{0:n2}",@Html.DisplayFor(model => model.Total_vant))
        </div>

        <div class="campo12">
            Tot.Desc: @Html.DisplayFor(model => model.Total_desc)
        </div>

        <div class="campo12" style="border: none;">
            Valor Líq:  @Html.DisplayFor(model => model.Val_liq)
        </div>
    </fieldset>
</fieldset>
<fieldset class="borda" style="border: none; border-right: 1px solid #000">
    <fieldset class="grupo">

        <div class="campo11">
            Salário Base: @Html.DisplayFor(model => model.Salariobase)
        </div>

        <div class="campo11">
            Salário e INSS:@Html.DisplayFor(model => model.BaseFGTS)
        </div>
        <div class="campo11">
            Base Cálc. FGTS: @String.Format("{0:n2}",@Html.DisplayFor(model => model.BaseFGTS))
        </div>

        <div class="campo11">
            FGTS do Mês: @String.Format("{0:n2}",@Html.DisplayFor(model => model.FGTSDesc))
        </div>

        <div class="campo11">
            Base Cálc. IRRF:  @Html.DisplayFor(model => model.BaseIRRF)
        </div>
    </fieldset>
</fieldset>
<fieldset class="borda">
    <div style="font-size: 10px;">
        <center>DECLARO TER RECEBIDO A IMPORTÂNCIA LÍQUIDA DESCRIMINADA NESTE RECIBO</center>
        <br />
    </div>
    <div style="float: left; margin-left: 80px; font-size: 10px;">
        <center> _____/______/______<br />
                        DATA</center>
    </div>
    <div style="float: right; margin-right: 80px; font-size: 10px;">
        <center>__________________________________________<br />
                     Assinatura do Funcionário</center>
    </div>
</fieldset>
<p>
    <input type="button" name="print" value="Imprimir" onclick="javascript: window.print();" class="noprint">
</p>
}
